<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<video src="a.mp3" controls></video>
</body>
<script>
  const video = document.querySelector('video');

  video.addEventListener('volumechange', (event) => {
    console.log(event)
    console.log('The volume changed.');
  });
// volume 属性设置或返回音频的音量，从 0.0 (静音) 到 1.0 (最大声)。

</script>
</html>